<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function fn1(){
            return new Promise(reslove=>{
                setTimeout(()=>{
                    console.log(111);
                    reslove(1)
                },2000)
            })
        }
        
        function fn2(){
            return new Promise(reslove=>{
                setTimeout(()=>{
                    console.log(222);
                    reslove(2)
                },2000)
            })
        }

        function fn3(){
            return new Promise(reslove=>{
                setTimeout(()=>{
                    console.log(333);
                    reslove(3)
                },2000)
            })
        }

        fn1().then(res=>{
            console.log(res);
            return fn2();
        }).then(res=>{
            console.log(res);
            return fn3()
        }).then(res=>{
            console.log(res);
        })
    </script>
</body>
</html>